<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>RatePlan List</title>
    <link type="text/css" href="${contextPath}/static/style/global.css" rel="stylesheet"/>
    <script type="text/javascript" src="${contextPath}/static/script/jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript">
        function delete_rate_plan(obj) {
            var ratePlanCode = obj.parent().parent().children("input:hidden").eq(0).val();
            var url = "./delRatePlan.dhtml?ratePlanCode=" + ratePlanCode;
        }
    </script>
</head>
<body>
<div class="main">
    <form id="rate_plan_list_form">
        <div align="right">
            <input class="common_button" type="button" value="Add"
                   onclick="window.location.href='./view.dhtml'">
            <input class="common_button" type="button" value="Import"
                   onclick="window.location.href='./importView.dhtml'">
        </div>
        <jsp:include page="../../../common/pagination.jsp"/>
        Match Priority:<span style="font-family: Verdana;font-weight: bolder;color: #0066cc;"> ${configInfo.value}</span>
        <table class="table_list" cellpadding="0" cellspacing="0">
            <thead>
            <tr>
                <th>Channel Pattern</th>
                <th>Hotel Pattern</th>
                <th>Rate Plan Pattern</th>
                <th>Room Type Pattern</th>
                <th>Type</th>
                <th>Unit</th>
                <th>Quantity</th>
                <th>Description</th>
                <th>Create Time</th>
                <th>Last Modify Time</th>
                <th>Operation</th>
            </tr>
            </thead>
            <tbody>
            <s:iterator value="paginater.objects" id="freeMealStrategy" status="one">
            <tr <s:if test="#one.index%2==0"> class="even" </s:if>
                    <s:else>class="odd"</s:else>>
                <input type="hidden" value="${id}">
                <td><s:property value="channelPattern"/></td>
                <td><s:property value="hotelPattern"/></td>
                <td><s:property value="ratePlanPattern"/></td>
                <td><s:property value="roomTypePattern"/></td>
                <td><s:property value="type"/></td>
                <td><s:property value="unit"/></td>
                <td><s:property value="quantity"/></td>
                <td><s:property value="description"/></td>
                <td><s:date name="createTime" format="yyyy-MM-dd HH:mm:ss"/></td>
                <td><s:date name="updateTime" format="yyyy-MM-dd HH:mm:ss"/></td>
                <td>
                    <a href="./editView.dhtml?freeMealStrategy.id=${id}">Edit</a>&nbsp;
                    <a href="./delete.dhtml?freeMealStrategy.id=${id}">Delete</a>
            </tr>
            </s:iterator>
            <tbody>
        </table>
        <jsp:include page="../../../common/pagination.jsp"/>
    </form>
</div>
</body>
</html>